<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户登录</title>
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        body {
            background-color: #f8f9fa;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .login-container {
            max-width: 400px;
            width: 100%;
            padding: 2rem;
            background: white;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
        }
        .login-header {
            text-align: center;
            margin-bottom: 2rem;
        }
        .login-header i {
            font-size: 3rem;
            color: #0d6efd;
        }
        .form-floating {
            margin-bottom: 1rem;
        }
        .alert {
            display: none;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <div class="login-header">
            <i class="bi bi-person-circle"></i>
            <h2 class="mt-3">用户管理系统</h2>
        </div>
        
        <#if error??>
            <div class="alert alert-danger" role="alert">
                <i class="bi bi-exclamation-triangle-fill"></i> ${error}
            </div>
        </#if>
        
        <form action="/login" method="post">
            <div class="form-floating mb-3">
                <input type="text" class="form-control" id="username" name="username" placeholder="用户名" required>
                <label for="username"><i class="bi bi-person"></i> 用户名</label>
            </div>
            
            <div class="form-floating mb-4">
                <input type="password" class="form-control" id="password" name="password" placeholder="密码" required>
                <label for="password"><i class="bi bi-key"></i> 密码</label>
            </div>
            
            <div class="d-grid">
                <button type="submit" class="btn btn-primary btn-lg">
                    <i class="bi bi-box-arrow-in-right"></i> 登录
                </button>
            </div>
        </form>
    </div>

    <script src="/static/js/bootstrap.bundle.min.js"></script>
    <script>
        // 如果有错误信息，显示警告框
        if (document.querySelector('.alert-danger')) {
            document.querySelector('.alert-danger').style.display = 'block';
        }
    </script>
</body>
</html> 